<!doctype html>
<html lang="en">
  <head>
    <title>湖南省主要珍稀植物管理信息系统</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="css/common.css">
  </head>
  <script src="./js/allData.js"></script>
  <script src="./js/vue.js"></script>
  <style>
      li a{
          line-height: 50px;
          font-size: 20px;
          color: white;
      }
  </style>
  <body style="background-image: url(img/14.jpg);background-size: 100% 8%;">
    <div id="navigator">
        <a id="systemName" href="index.html" style="color: white;">
            <b>湖南省主要珍稀植物管理信息系统</b>
        </a>
        
    </div>
    <div class="container-fluid pt-3 mt-2">
        <div class="row">
            <div id="nav-side" class="col-md-2 pl-0 ml-0" >
                <ul class="nav flex-column navbar-dark pl-0 ml-3" >
                    <!-- 带下拉的导航 -->
                    <li class="nav-item">
                        <a href="index.html" class="nav-link">首页</a>
                    </li>
                    <li class="nav-item">
                        <a href="dynamics.html" class="nav-link">保护动态</a>
                    </li>
                    <li class="nav-item">
                        <a href="policy.html" class="nav-link">政策法规</a>
                    </li>
                    

                    <li class="nav-item dropdown ">
                        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">用户管理</a>
                        <div class="dropdown-menu">
                            <a class="dropdown-item" href="user.html">查看用户</a>
                            <a class="dropdown-item" href="adduser.html">添加用户</a>
                        </div>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">植物管理</a>
                        <div class="dropdown-menu">
                            <a class="dropdown-item" href="plant.html">查看植物</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="addplant.html">添加植物</a>
                        </div>
                    </li>
                </ul>
            </div>

            <div id="app" class="pl-3 ml-3 col-md-9">
                <nav>
                    <a style="position: relative;left: 70%;color: blue;" href="plant.html">查看湖南省地方重点保护植物</a>
                    <a style="position: relative;left: 72%;color: blue;" href="nplant.html">查看湖南省国家重点保护植物</a>
                </nav>

                <h2 style="margin-top: 5%;">湖南省地方重点保护植物</h2>
                <table class="table table-bordered mt-5" id="tab">
                    <thead>
                        <tr>
                            <th style="border: 1px solid black;">中名</th>
                            <th style="border: 1px solid black;">科名</th>
                            <th style="border: 1px solid black;">种名</th>
                            <th style="border: 1px solid black;">备注</th>
                            <th style="border: 1px solid black;width: 8%;">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(plant, index) in plants" :key="index">
                            <td style="border: 1px solid black;">{{plant.middlename}}</td>
                            <td style="border: 1px solid black;">{{plant.family}}</td>
                            <td style="border: 1px solid black;">{{plant.species}}</td>
                            <td style="border: 1px solid black;">{{plant.remarks}}</td>
                            <td style="border: 1px solid black;">
                                <button v-if="plant.status==0" class="btn btn-danger" type="button" @click="plants.splice(index,1)" style=" background-color: #12a4ba;">删除</button>  
                            </td>
                        </tr>
                    </tbody>
                </table>

            </div>
           
        </div>
    </div>


    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  </body>
</html>
<script>
    new Vue({
        el:"#app",
        data() {
            return {
                users:users,
                plants:plants,
            }
        },
       
    })
   
</script>